package com.carbon.controller;

import com.carbon.feignclient.MemberFeignClient;
import com.carbon.model.Member;
import com.carbon.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yeshusheng
 * @version 1.0.0
 * @date 2021/6/28 19:34
 * @description  feignclient示例代码 演示服务之间的调用
 */
@RestController
@RequestMapping("/member")
public class MemberController {
    @Autowired
    MemberFeignClient memberClient;

    @RequestMapping(value = { "/login" },method = { RequestMethod.GET })
    public Result<Member> login(){
        return memberClient.login();
    }
}
